/**
 * Created with IntelliJ IDEA.
 * Description:
 * Date: 2024-01-24
 * Time:15:59
 */
public class TestDemo {
    public static void main(String[] args) {
        // 使用常量串构造
        String s1 = "hello world";

        //使用new实例化对象
        String s2 = new String("hello world");

        //使用字符数组进行构造
        char[] array = {'h','e','l','l','o','w','o','r','l','d'};
        String s3 = new String(array);
    }
}
